package com.cy.algorithm.binarytree.cover;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author chen_yu
 * @date 2020/12/13 20:22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TreeNode<T> {

    /**
     * 二叉树的数据节点
     */
    private T data;

    /**
     * 左子树
     */
    private TreeNode<T> left;

    /**
     * 右子树
     */
    private TreeNode<T> right;

    public TreeNode(T data) {
        this.data = data;
    }

    public TreeNode(T data, TreeNode<T> left) {
        this.data = data;
        this.left = left;
    }
}
